package stack;

public class ArrayStackTest {
    public static void main(String[] args) {
        ArrayStack arrayStack = new ArrayStack(5);
        arrayStack.push(1);
        arrayStack.push(2);
        arrayStack.push(3);
        arrayStack.push(4);
        arrayStack.push(5);
        System.out.println("栈顶元素" + arrayStack.peek());

        //出栈一个元素
        arrayStack.pop();
        arrayStack.pop();
        arrayStack.pop();
        arrayStack.list();
        System.out.println("栈顶元素" + arrayStack.peek());

    }
}
